package com.bytz.modules.cms.reseller.entity;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bytz.common.aspect.annotation.Dict;
import com.bytz.modules.cms.common.excel.ExcelDictConvert;
import com.bytz.modules.cms.user.model.IChangeEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 莱宝CMS—经销商管理—经销商/商品历史变动表
 * </p>
 *
 * @author KyleWang
 * @since 2022-10-10
 */
@Data
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = false)
@TableName("cms_reseller_product_change")
@ApiModel(value = "ResellerProductChange对象", description = "莱宝CMS—经销商管理—经销商/商品历史变动表")
public class ResellerProductChange implements Serializable, IChangeEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    private String id;

    @ApiModelProperty(value = "经销商关联产品ID")
    private String resellerProductId;

    @ApiModelProperty(value = "经销商ID")
    private String resellerId;

    @ApiModelProperty(value = "产品ID")
    private String productId;

    @ExcelProperty("产品编码")
    @ApiModelProperty(value = "产品编码")
    private String productNumber;

    @ApiModelProperty(value = "产品名称")
    private String productDesc;

    @ApiModelProperty(value = "标准价格")
    private BigDecimal basePrice;

    @ApiModelProperty(value = "优惠后价格")
    private BigDecimal discountPrice;

    @ExcelProperty(value = "偏移方式(无价格/加)", converter = ExcelDictConvert.class)
    @ApiModelProperty(value = "现偏移方式：无价格；加")
    @Dict(dicCode = "reseller_product_offset_type")
    private String offsetType;

    @ExcelProperty("偏移值(无价格时为空)")
    @ApiModelProperty(value = "现偏移值")
    private BigDecimal offsetValue;

    @ApiModelProperty(value = "现最终价格")
    private BigDecimal finalPrice;

    @ApiModelProperty(value = "生效时间")
    private LocalDateTime effectTime;

    @ApiModelProperty(value = "失效时间")
    private LocalDateTime expiredTime;

    @ApiModelProperty(value = "状态（0：未同步，1：已同步）")
    private String syncStatus;

    @ApiModelProperty(value = "审批批次ID")
    private String auditBatchId;

    @ApiModelProperty(value = "删除状态")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "创建人姓名")
    private String createByName;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @ApiModelProperty(value = "更新人姓名")
    private String updateByName;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;


}